package com.constants;

import com.controller.MainController;
import javafx.scene.image.Image;

import java.io.File;
import java.util.HashMap;
import java.util.Map;

/**
 * @author Kilon
 * @date 2022/3/19
 * @apiNote
 */
public class Constants {
    public static String title = "Kilon's 番茄时间";
    public static Image icoImage = new Image("fanqie.png");
    //String filePath = MainController.class.getClassLoader().getResource(Constants.fileName).getFile();
    public static String fileName =  "mytask.xlsx";
    public static String fxmlPath =  "";
    public static String  filePath = new File(".",Constants.fileName).getPath();
    //Controller容器
    public static Map<String, Object> controllers = new HashMap<String, Object>();
    //public static String AddTask = "添加待办";
    //public static String AddBusyTask = "紧急待办";
}


//static Properties properties = new Properties();
//
//public Constants() {
//    // 使用ClassLoader加载properties配置文件生成对应的输入流
//    InputStream in = Constants.class.getClassLoader().getResourceAsStream("my.properties");
//    // 使用properties对象加载输入流
//    try {
//        properties.load(in);
//    } catch (IOException e) {
//        e.printStackTrace();
//    }
//    ////获取key对应的value值
//    //properties.getProperty(String key);
//}

//public static String AddTask = properties.getProperty("AddTask");
//public static String AddBusyTask = properties.getProperty("AddBusyTask");